/**
 * <p>Copyright (c) 2017 深圳市鹏途交通科技有限公司 </p>
 * <p>				   All right reserved. 		     </p>
 * 
 * <p>项目名称 ： 	深圳市国省检日常化监管系统         </p>
 * <p>创建者   :	heyong 
 * 
 * <p>描   述  :   RoadNet.java for com.pengtu.gsj.entity.zhgl    </p>
 * 
 * <p>最后修改 : $: 2017年8月22日-下午4:27:40 v 1.0.0	 heyong   $ </p>
 * 
*/

package com.pengtu.gsj.entity.zhgl;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * RoadNet
 * 路网结构
 * 2017年8月22日 下午4:27:40
 * 
 * @version 1.0.0
 * 
 */
@Entity
@Table(name = "T_ZH_ROADNET")
public class RoadNet extends IdEntity {

	private static final long serialVersionUID = -1223443029090790141L;
	
	private String year;					//年份
	private Double hightWayKM;				//高速公路里程
	private Double oneClassKM;				//一级公路里程
	private Double twoClassKM;				//二级公路里程
	private Double threeClassKM;			//三级公路里程
	private Double fourClassKM;				//四级公路里程
	private Double ortherClassKM;			//等外公路里程
	private Double geTwoClassPat;			//二级及以上等级公路比例
	private Double ortherClassPat;			//等外公路比例
	private String remark;				
	
	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	@Column(name = "YEAR")
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	@Column(name = "HIGHTWAYKM")
	public Double getHightWayKM() {
		return hightWayKM;
	}
	public void setHightWayKM(Double hightWayKM) {
		this.hightWayKM = hightWayKM;
	}
	@Column(name = "ONECLASSKM")
	public Double getOneClassKM() {
		return oneClassKM;
	}
	public void setOneClassKM(Double oneClassKM) {
		this.oneClassKM = oneClassKM;
	}
	@Column(name = "TWOCLASSKM")
	public Double getTwoClassKM() {
		return twoClassKM;
	}
	public void setTwoClassKM(Double twoClassKM) {
		this.twoClassKM = twoClassKM;
	}
	@Column(name = "THREECLASSKM")
	public Double getThreeClassKM() {
		return threeClassKM;
	}
	public void setThreeClassKM(Double threeClassKM) {
		this.threeClassKM = threeClassKM;
	}
	@Column(name = "FOURCLASSKM")
	public Double getFourClassKM() {
		return fourClassKM;
	}
	public void setFourClassKM(Double fourClassKM) {
		this.fourClassKM = fourClassKM;
	}
	@Column(name = "ORTHERCLASSKM")
	public Double getOrtherClassKM() {
		return ortherClassKM;
	}
	public void setOrtherClassKM(Double ortherClassKM) {
		this.ortherClassKM = ortherClassKM;
	}
	@Column(name = "GETWOCLASSPAT")
	public Double getGeTwoClassPat() {
		return geTwoClassPat;
	}
	public void setGeTwoClassPat(Double geTwoClassPat) {
		this.geTwoClassPat = geTwoClassPat;
	}
	@Column(name = "ORTHERCLASSPAT")
	public Double getOrtherClassPat() {
		return ortherClassPat;
	}
	public void setOrtherClassPat(Double ortherClassPat) {
		this.ortherClassPat = ortherClassPat;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
	
}
